package routes

import (
	"github.com/gin-gonic/gin"
	"go-project/middleware"
)

func InitRoute(r *gin.Engine) {
	//common.DB.AutoMigrate(&models.Admin{})
	r.Use(middleware.ErrorMW())
	r.Static("/statics", "./statics")
	r.LoadHTMLGlob("templates/**/**/*")
	AdminInitRoute(r)
	ApiInitRoute(r)
}
